function addLine() {
    let str=null;


    let tbody = document.querySelector("#tbl").querySelector("tbody");
    let tr = document.createElement("tr")
    for (let i = 0; i <= 8; i++) {



        if (i == 0) {
            str+="<td width='100' name='id'></td>"

        }

        if (i ==1 ) {
            td.innerHTML = "<a onclick='delLine(this)'>删除</a>"
        }

        tr.appendChild(td)
    }


    tbody.appendChild(tr)
}



// 	var	playlist = [
    // // {title:name,artist:"gname",mp3:"/dev/views/cxy/music/"+name+".mp3",cover:"/dev/views/cxy/music/img/" + img,},
    // {title:"Uptown Funk",artist:"Mark Ronson",mp3:"jq22-1.mp3",cover:"t2.png",},
    // ];
    var time=localStorage.getItem('time');
    // if (time!=null)
    // {

    // }
    // if (time!=0)
    // {
    // 	var isRotate = true;
    // 	var autoplay = true;
    // 	console.log("000")
    // }

    var timet=Math.round(time)
    console.log(timet)
    if (timet!=0)
{
    var isRotate = true;
    var autoplay = false;

}else {
    var isRotate = true;
    var autoplay = false;
}


    function bgChange(){
    var lis= $('.lib');
    for(var i=0; i<lis.length; i+=2)
    lis[i].style.background = 'rgba(246, 246, 246, 0.7)';
}
    window.onload = bgChange;



    $(function(){
    $("#app").load('/dev/views/slx/nav.html');
})



//上传七牛云
    $(function(){
    layui.use(['upload', 'element', 'layer'], function() {
    var $ = layui.jquery
    , upload = layui.upload
    , element = layui.element
    , layer = layui.layer;
    upload.render({
    elem: '#test10',
    accept: 'file'
    ,url: '/dev/file/test' //此处用的是第三方的 http 请求演示，实际使用时改成您自己的上传接口即可。
    ,done: function(res){
    console.log(res)
    let phone=localStorage.getItem("phone")
    let photo =`http://${res.data.imageUrl[0]}`;

    $.ajax({
    type: 'post',
    url:`/dev/user/photo/${phone}`,
    dataType:'json',
    contentType:'application/json',
    data:photo,
    success:function (result){

}
}
    );

    layer.msg('上传成功');
    layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', `http://${res.data.imageUrl[0]}`);
}//进度条
    ,progress: function(n, elem, e){
    element.progress('demo', n + '%'); //可配合 layui 进度条元素使用
    if(n == 100){
    layer.msg('上传完毕', {icon: 1});
}
}
});
})
})


    $(function (){
    $(".playerxiao").load('/dev/views/cxy/views/cemian.html');
})

function sendJson01(){
    let phone=localStorage.getItem("phone")
    // console.log(phone)
    let username = $("#username").val();
    let intro = $("#intro").val();
    // let phone = $("#phone").val();


    let jsonData={username:username,intro:intro}
    console.log(jsonData)
    // jsonData = JSON.stringify(jsonData);

    //post请求允许传参的形式是一个json字符串
    $.ajax({
        type: 'post',
        url:`/dev/user/param01/${phone}`,
        // dataType:'json',
        // contentType:'application/json',
        data:jsonData,
        success:function (result){
            alert("保存成功")
            window.location.href = "personalcenter.html";
        },
        error()
        {
            alert("保存失败")

        }})
}